package com.springboot.framework.service;

import com.springboot.framework.model.CouponsModel;

import java.util.List;

/**
 * @author SWF
 * @date 2019/6/20 9:40
 **/
public interface CouponsService {

    /**
     * 查看未删除的优惠券信息
     * @param couponsId
     * @return
     */
    CouponsModel get(Integer couponsId);

    /**
     * 查看未删除的优惠券列表
     * @return
     */
    List<CouponsModel> list();

    /**
     * 添加优惠券
     * @param couponsModel
     * @return
     */
    CouponsModel insert(CouponsModel couponsModel);

    CouponsModel update(CouponsModel couponsModel);

    /**
     * 删除优惠券发券信息
     * @param couponsId
     */
    void delete(Integer couponsId);

    /**
     * 优惠券减库存
     * @param couponsId
     */
    void decreaseStock(Integer couponsId);
}
